<template lang="jade">
div(class="search-bar")
    el-form(class="form search",:inline="true",size="small")
        el-form-item
            el-input(placeholder="输入产品标题进行查询",
                  @change="do_search",
                  style="width:300px;",
                  v-model="filter.productName")
        el-form-item
            el-input(placeholder="输入产品或sku备注进行查询",
                  @change="do_search",
                  style="width:300px;",
                  v-model="filter.remark")
        el-form-item
            el-button(@click="do_search") 
                i(class="el-icon-search") 查询 
</template>
<script>
    export default {
        data(){
            return {
                simpleSearch: true,
            }
        },
        props:{filter:{type:Object,default:{}}},

        model:{prop:'filter',event:'update'},

        methods:{
            do_search(){
                this.$emit('update', this.filter);
                this.$emit('do-search');
            }
        },
    }
</script>